<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        <button>登录</button>

        <a href="http://localhost:8000/index.html">比特币甩卖</a>
    </div>

    <script>
        var btn = document.querySelector('button')
        btn.onclick = function () {
            var xhr = new XMLHttpRequest()
            xhr.open('GET', 'http://localhost:4000/api/login')
            xhr.send()
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4 && xhr.status === 200) {
                    console.log(xhr.responseText)
                }
            }
        }
    </script>
</body>
</html>
